package com.nav.rummy.core;
public enum Suit {
	CLUBS, DIAMONDS, HEARTS, SPADES;
	public static Suit getInstance(char s) {
		switch (s) {
		case 'C':
			return CLUBS;
		case 'D':
			return DIAMONDS;
		case 'H':
			return HEARTS;
		case 'S':
			return SPADES;
		case 'c':
			return CLUBS;
		case 'd':
			return DIAMONDS;
		case 'h':
			return HEARTS;
		case 's':
			return SPADES;
		case '\u2663':
			return CLUBS;
		case '\u2662':
			return DIAMONDS;
		case '\u2661':
			return HEARTS;
		case '\u2660':
			return SPADES;
		case '\u2667':
			return CLUBS;
		case '\u2666':
			return DIAMONDS;
		case '\u2665':
			return HEARTS;
		case '\u2664':
			return SPADES;
		}
		return null;
	}

	public char toChar() {
		switch (this) {
		case CLUBS:
			return 'C';
		case DIAMONDS:
			return 'D';
		case HEARTS:
			return 'H';
		case SPADES:
			return 'S';
		}
		return ' ';
	}
}
